from net_project_tools.XinQuestionPage import XinQuestionPage
from page.net_project_tools.net_question_page import NetQuestionPage
import user_data
import unittest
from create_data.create_test_data import *
import warnings


class XinQuestionTest(unittest.TestCase):

    def setUp(self):
        warnings.simplefilter('ignore', ResourceWarning)
        dr = Xin_and_login(user_data.Xinxi_project_admin)
        release_questionnaire(dr)
        dr.quit()

    def tearDown(self):
        self.page.logout()

    def test_net_question(self):
        """调查问卷"""
        self.page = XinQuestionPage()
        self.page.login(*user_data.Xinxi_student)
        self.page.enter_project()
        self.page.enter_tools('调查问卷')
        # self.page.submit_question()   #6
        self.page.submit_questions()  #6s


if __name__ == '__main__':
    unittest.main()
